<?php
	class statistics extends BaseController{
		public $security_level = SECURITY_LEVEL_ADMIN;
			
		public function getData($in_params){
			return;
		}
		
		public function action_statistics($in_params = array()){
			$memcache = new myMemcache();
			$result = array();
			if($result["memcache_active"] = $memcache->getState()){
				$result["memcache_stats"] = $stats = $memcache->getStats();
				$result["memcache_load"] = (($stats["bytes"] / 1024) / (64 * 1024)) * 100;	
				$result["memcache_items"] = $stats["total_items"];
			}
			$m_order = new m_order();
			$m_seat = new m_seat();
			$m_user = new m_user();
			
			$result["order_count"] = $m_order->selectCount();
			$result["seat_count"] = $m_seat->selectCount();
			$result["user_count"] = $m_user->selectCount();
			
			return $result;
		}
	}
?>